﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using System.Text;
using com.clinica.business.BE.gesliq;
using com.clinica.business.BL.interfaces.gesliq;
using com.clinica.DL.sql.gesliq;
using com.clinica.business.entities;

namespace com.clinica.business.BL.gesliq
{
    [ServiceBehavior(Name = "ParametrosBL",
    Namespace = "http://com.clinica.business.BL.interfaces.gesliq",
    ConcurrencyMode = ConcurrencyMode.Multiple,
    InstanceContextMode = InstanceContextMode.PerSession,
    IncludeExceptionDetailInFaults = true)]
    public class ParametrosBL : IParametrosBL
    {
        #region IParametrosBL Members

        public List<com.clinica.business.BE.gesliq.ParametrosBE> ObtenerParametros(com.clinica.business.BE.gesliq.ParametrosBE request)
        {
            /****************************************************************************************
             * Sistema    : Sistema de Gestión de Clinica
             * Modulo     : Facturación y Presupuestos
             * Descripción: 
             * Autor      : JPEREZ
             * Fecha      : 2011-06-01
             ****************************************************************************************/

            List<ParametrosBE> lstParm = new List<ParametrosBE>();
            try
            {
                if (request.NombreTabla.Trim() != string.Empty)
                {
                    lstParm = ParametrosDL.ObtenerTabla(request);
                }
            }
            catch (Exception ex)
            {
                FaultReason err = new FaultReason(ex.Message);
                throw new FaultException(err);
                //new ErrorSGC(1,ex.Message)
            }
            return lstParm;
        }

        #endregion
    }
}
